<?php
/**
 * Created by PhpStorm.
 * User: venki
 * Date: 2023/11/18
 * Time: 18:14
 */

namespace app\services;

use app\behaviors\UserBehavior;
use app\events\UserEvent;
use Yii;
use yii\base\Component;

class VenkiEventService extends Component
{
    public function behaviors(): array
    {
        return [
            UserBehavior::class
        ];
    }

    public static function venkiEvent(array $data): void
    {
        (new VenkiEventService)->trigger(UserEvent::USER_SEND_WX, new UserEvent($data));
        (new VenkiEventService)->trigger(UserEvent::USER_SEND_MAIL, new UserEvent($data));
    }
}